package com.leyou.item.mapper.lymapper;

import com.leyou.item.entity.Category;
import com.leyou.item.mapper.LyBaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author linzx
 * @date 2020/3/24
 */
public interface CategoryMapper extends LyBaseMapper<Category> {
    @Select("select a.id , a.name , a.parent_id, a.is_parent , a.sort from tb_category a " +
            "join tb_category_brand b on b.category_id = a.id where b.brand_id = #{bid};")
    List<Category> findCategoryByBrandId(@Param("bid") Long bid);
}
